package com.ktjiaoyu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;

@Controller
public class HelloAnnationController {

    @RequestMapping("/login")
    public void login(){

    }

    @RequestMapping("/user/hello")
    public String hello(Map map,HttpServletResponse response) throws IOException {
        map.put("name","张贞");
        PrintWriter out = response.getWriter();
        out.print("你好，SpringMVC");

        return "redirect:hello.jsp";
    }

}
